home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_vim.idb / usr / freeware / share / vim / syntax / asn.vim.z / asn.vim
Encoding:
Text File  |  1998-10-28  |  2.4 KB  |  60 lines

  1. " Vim syntax file
  2. " Language:    ASN.1
  3. " Maintainer:    Claudio Fleiner <claudio@fleiner.com>
  4. " URL:        http://www.fleiner.com/vim/syntax/asn.vim
  5. " Last change:    1998 Jan 12
  6.  
  7. " Remove any old syntax stuff hanging around
  8. syn clear
  9.  
  10. " keyword definitions
  11. syn keyword asnExternal       DEFINITIONS TAGS BEGIN END IMPLICIT DEFAULT IMPORTS EXPORTS FROM
  12. syn keyword asnTypeInfo       ABSENT PRESENT OPTIONAL FROM SIZE UNVERSAL APPLICATION PRIVATE
  13. syn keyword asnBoolValue      TRUE FALSE
  14. syn match   asnNumber         "\<PLUS-INFINITY\>"
  15. syn match   asnNumber         "\<MINUS-INFINITY\>"
  16. syn keyword asnType           INTEGER REAL STRING BIT BOOLEAN OCTET NULL EMBEDDED PDV
  17. syn keyword asnType           BMPString IA5String TeletexString GeneralString GraphicString ISO646String NumericString PrintableString T61String UniversalString VideotexString VisibleString
  18. syn match   asnType           "\.\.\."
  19. syn match   asnType           "OBJECT\s\+IDENTIFIER"
  20. syn match   asnType           "TYPE-IDENTIFIER"
  21. syn keyword asnStructure      CHOICE SEQUENCE SET OF ENUMERATED CONSTRAINED BY WITH COMPONENTS CLASS
  22.  
  23. " Strings and constants
  24. syn match   asnSpecial           contained "\\[0-9][0-9][0-9]\|\\."
  25. syn region  asnString            start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=asnSpecial
  26. syn match   asnCharacter         "'[^\\]'"
  27. syn match   asnSpecialCharacter  "'\\.'"
  28. syn match   asnNumber            "-\=\<[0-9]\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
  29. syn match   asnLineComment       "--.*"
  30. syn match   asnLineComment       "--.*--"
  31.  
  32. syn match asnDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 contains=asnType
  33. syn match asnBraces     "[{}]"
  34.  
  35. syn sync ccomment asnComment
  36.  
  37. if !exists("did_asn_syntax_inits")
  38.   let did_asn_syntax_inits = 1
  39.   " The default methods for highlighting.  Can be overridden later
  40.   hi link asnDefinition       Function
  41.   hi link asnBraces           Function
  42.   hi link asnStructure        Statement
  43.   hi link asnBoolValue        Boolean
  44.   hi link asnSpecial          Special
  45.   hi link asnString           String
  46.   hi link asnCharacter        Character
  47.   hi link asnSpecialCharacter asnSpecial
  48.   hi link asnNumber           asnValue
  49.   hi link asnComment          Comment
  50.   hi link asnLineComment      asnComment
  51.   hi link asnType             Type
  52.   hi link asnTypeInfo         PreProc
  53.   hi link asnValue            Number
  54.   hi link asnExternal         Include
  55. endif
  56.  
  57. let b:current_syntax = "asn"
  58.  
  59. " vim: ts=8
  60.